<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <f:metadata>
        <f:event type="preRenderView" listener="#{LoginBean.loginCheck}"/>
    </f:metadata>

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="./css/main.css" rel="stylesheet" type="text/css" />
        <link href="./css/custom-theme/jquery-ui-1.8.5.custom.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"/>
        <script type="text/javascript" src="js/menu.js"/>
        <script type="text/javascript" src="js/extendedSearch.js"/>
        <title>UltimaTorrent</title>
    </h:head>

    <h:body>
        <div id="divTop">
            <div id="divTopL">
                <ul id="ulLinks">
                    <li class="menuCat" id="torrents">Torrents</li>
                    <li class="menuCat" id="profile">Profile</li>
                </ul>

                <ui:insert name="top">

                </ui:insert>

                <div id="logo">
                    <a href="index.jsf">
                        <img alt="logo.jpg"  src="./img/logo.jpg"/>
                    </a>
                </div>
            </div>
        </div>

        <div id="divMain" class="center_content">
            <ui:insert name="content"></ui:insert>
        </div>

        <div id="divBottom">
            <ui:insert name="bottom">
                <center>
                    GLASSFISH IS TOTAL UTTER FAIL!!!!
                </center>
            </ui:insert>
        </div>

        <div class="dropdownbox" id="torrents_dropdown">
            <ul class="linkList">
                <li class="link"><a href="browse.jsf">Browse</a></li>
                <li class="link"><a href="search.jsf">Search</a></li>
                <li class="link"><a href="uploadTorrent.jsf">Upload</a></li>
            </ul>
        </div>

        <div class="dropdownbox" id="profile_dropdown">
            <ul class="linkList">
                <li class="link"><a href="profile.jsf">My Profile</a></li>
                <li class="link"><h:form><h:commandLink id="link" action="#{LoginBean.logout}">Log out</h:commandLink></h:form></li>

            </ul>
        </div>
    </h:body>

</html>
